<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
 <form submit="return false;">
  <h3>一个id一个终端</h3>
  <textarea id="responseText" style="width: 500px; height: 300px;"></textarea>
  <br>
  <input type="text" name="message" style="width: 300px" value="websock">
 </form>
 <br>
 <br>
</body>
</html>
<script src="../js/hyl.ws.js"></script>
<script type="text/javascript">
  var arr=[]
  var hws = new HylWSocket("ws://localhost:8080/hjsp/ws2/<%=request.getParameter("id")%>", function(e) {
    //console.log(e.data)
    arr.push(e.data)
    document.getElementById("responseText").innerHTML=arr.join("\r\n")
  });

</script>